package exec;

public class Exec03_3 {

    public static void main(String[] args) {
        //
        int[] arr = {12, 23, 34, 19, 19, 25, 17, 25, 17, 23, 17, 19};
        int count = 0;
        for (int i = 0; i < arr.length; i++) {
            for (int j = i + 1; j < arr.length - count; j++) {
                if (arr[i] == arr[j]) {
                    arr[j] = arr[arr.length - count - 1];
                    count++;
                    j --;
                }
            }
        }
        int[] newArr = new int[arr.length - count];
        for (int i = 0; i < newArr.length; i++) {
            newArr[i] = arr[i];
        }

        for (int i = 0; i < newArr.length; i++) {
            System.out.println(newArr[i]);
        }
    }
}
